<?php 
// +---------------------------------------------------------------------------+
// | This file is part of a MANUSER project.                                |
// | Copyright (c) 20011 the MANUSER Project.                                 |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code. You can also view the    |
// | LICENSE file online at http://                                            |
// |   vi: set noexpandtab:                                                    |
// |   Local Variables:                                                        |
// |   indent-tabs-mode: t                                                     |
// |   End:                                                                    |
// +---------------------------------------------------------------------------+

// start using session
session_start();
 
// turn on reporting
error_reporting(E_ALL);

// set timezone
date_default_timezone_set('Asia/Ho_Chi_Minh');

// reject directly run
define('IN_MANU', true);

// define website path
$manuPath = realpath(dirname(__FILE__));

define ('MANU_PATH', $manuPath);

//global $COOKIE_NAME;
//global $COOKIE_USER;


// load init file
include MANU_PATH . '/application/init.php';


// init Router
$manu->router = new Router($manu);

// set back-end page
//$manu->admincp = true;

// set debug mode
$manu->debug = true;

// set controller path
$manu->router->setPath (MANU_PATH . '/controller');

// set root path
define('MANU_ROOT_PATH', $manu->router->getRoot());

// init Template Engine
$manu->template = new Template($manu);

$manu->db = new DB($manu);

$manu->db->startConnection();

// run the app
$manu->router->loader();

$manu->db->closeConnection();
 
?>